package edu.cuit.zhuyimeng.aircraft.controller.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.io.Serial;
import java.io.Serializable;

/**
 *  创建飞机DTO
 */
@Schema(description = "创建飞机DTO")
@Data
public class CreateAircraftDTO implements Serializable {

    /**
     * 飞机型号
     */
    @Schema(description = "飞机型号")
    @NotBlank(message = "飞机型号不能为空")
    private String model;

    /**
     * 航空公司ID
     */
    @Schema(description = "航空公司ID")
    @NotNull(message = "航空公司ID不能为空")
    private Integer airlineId;

    /**
     * 飞机座位数
     */
    @Schema(description = "飞机座位数")
    @Range(min = 1,message = "飞机容量最少为1")
    private Integer capacity;

    @Serial
    private static final long serialVersionUID = 1L;

}
